A message transfer agent (MTA) is a program responsible for receiving incoming email and delivering the email message to individual users. Generally, the MTA is a processing pipeline that receives a message from an external source, categorizes and routes the message to the appropriate recipients, and then sends the message to the proper destinations. Frequently, when processing a message within the MTA, it is desirable to hand over the message to an extensibility point that allows an external operation to be performed upon the message. For example, an extensibility point may be invoked to scan a message for a virus, to determine whether there should be an intercepting party for a message, to add a disclaimer to a message, or to cease communication with a party sending spam mail. These external operations may involve execution of external code and may run out of process or require invocation of a remote service.
In simple a case, an extensibility point will receive a message from the MTA, fully perform its operation on the message, and then return the message to the MTA for further processing. In a more complicated case, however, it may not be possible for the extensibility point to fully execute its operation when the message is first received. Accordingly, to avoid unnecessary delay of the transfer and delivery processes, the extensibility point may partially execute its operation, return the message to the MTA, and then later re-access the message from the MTA to complete the operation. In this more complicated scenario, the extensibility point may flag the message prior to returning it to the MTA. The extensibility point will remove the flag only after it has re-accessed the message and completed its operation. To ensure that the message will not be distributed until the operation is completed, the MTA will not distribute the message until the flag has been removed.
While this extensibility point return creates improved message processing efficiency, it also results in a number of message accessing problems. In particular, an extensibility point may not remove a message flag when an operation is completed. Also, even if a flag has already been removed, an extensibility point may nevertheless attempt to inappropriately access a message. In fact, an extensibility point may attempt to inappropriately duplicate the same operation on a single message. In some cases, an extensibility point may even attempt to access a message on which it is not intended to perform any operation at all or which is meant to be handed over to a different extensibility point. These and other accessing errors may result in unnecessary delay to message distribution and, in some cases, may even prevent some recipients from ever receiving a message. Additionally, these accessing errors may result in a failure to fully and/or correctly perform extensibility point operations and may damage message content or even the overall performance of the email system. Accordingly, there is a need in the art for systems and methods for regulating an extensibility point's access to a message.